package com.obas.integration.element.telnet.editor;

import com.obas.model.business.DeviceMacAddress;

public class ZTES8902TelnetEditor extends AbstractTelnetEditor {

	public DeviceMacAddress editAsText(String text) {

		String macAddress = formatString(text.substring(0, 14));
		String vid = formatString(text.substring(14, 20));
		String port = formatString(text.substring(25, 39));
		// String Time = formatString(text.substring(37, 63));
		// String vc = formatString(text.substring(63, 73));
		// String time = formatString(text.substring(73, 79));

		DeviceMacAddress deviceMacAddress = new DeviceMacAddress();

		// HWPortFeatureType hWPortFeatureType = HWPortFeatureType.getByText(substring(port,0,2));
		// deviceMacAddress.setPortFeatureType(null != hWPortFeatureType ? hWPortFeatureType.getPortFeatureType() :
		// null);

		deviceMacAddress.setMacAddress(asMacAddress(macAddress));

		// ZTEMacAddressType zTEMacAddressType = ZTEMacAddressType.getByText(type);
		// deviceMacAddress.setMacAddressType(null != zTEMacAddressType ? zTEMacAddressType.getMacAddressType() : null);

		deviceMacAddress.setPortCode(port);
		deviceMacAddress.setVlan(vid);

		return deviceMacAddress;
	}

}
